package tech.eyao.hs60x.redis.template;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import tech.eyao.hs60x.co.AccountCo;
import tech.eyao.hs60x.redis.serializer.FastJson2JsonRedisSerializer;

/**
 * @author hejian
 * @date 2018年1月15日 下午7:45:11
 */
public class AccountCoRedisTemplate extends RedisTemplate<String, AccountCo> {

	@Override
	public void afterPropertiesSet() {
		  this.setKeySerializer(new StringRedisSerializer());
	        this.setValueSerializer(new FastJson2JsonRedisSerializer<AccountCo>(AccountCo.class));
	        super.afterPropertiesSet();
	}
}
